/*
===========================================================================
This source file is part of DyLab (Dynamic Laboratory)
For the latest info, see http://dylab.googlecode.com

Copyright (c) 2006-2008 Lukas Krejci
(krejci.lukas@volny.cz)

This file is part of DyLab.

    DyLab is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    DyLab is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DyLab.  If not, see <http://www.gnu.org/licenses/>.
===========================================================================
*/

#ifndef __dylab_types_h__
#define __dylab_types_h__

//===========================================================================================
#include <dylab/dylab.h>

//===========================================================================================
#include <boost/cstdint.hpp>

namespace dylab {

    // define the floating type
#   if DYLAB_DOUBLE_PRECISION == 1
        typedef double real_t;
#   else
        typedef float real_t;
#   endif

    // basic integer types    
    typedef boost::int8_t   int8_t;
    typedef boost::int16_t  int16_t;
    typedef boost::int32_t  int32_t; 
    typedef boost::int64_t  int64_t; 
    typedef boost::uint8_t  uint8_t;
    typedef boost::uint16_t uint16_t;
    typedef boost::uint32_t uint32_t;
    typedef boost::uint64_t uint64_t; 

    // simulation forward class declaration    
    class DYLAB_EXPORT Simulation;       
    class DYLAB_EXPORT SimObject;       
    class DYLAB_EXPORT Vector3;

    // some useful macros
#   define DYLAB_R(n)              dylab::real_t(n)
#   define DYLAB_DELETE(p)         if ((p) == NULL) { delete   (p); (p) = NULL; }
#   define DYLAB_DELETE_ARRAY(p)   if ((p) == NULL) { delete[] (p); (p) = NULL; }
}
//===========================================================================================
#endif // __dylab_types_h__
